
import Vue from 'vue'

const state = {


  points:[],

  pointsId: null,
}

// getters
const getters = {
  // getPoints:state => {
  //   return state.points
  // }
}

// 异步操作
const actions = {
  initPoints ({ commit, state }, points){
    commit('initPoints', points)
  }
}

// 提交操作
const mutations = {
  initPoints:function(state,points){
   state.points = points
  },
  setPointsId:function(state,pointsId){
    if(state.pointsId!=null){
      clearInterval(state.pointsId)
    }

   }
}
// 导出
export default {
  state,
  getters,
  actions,
  mutations
}
